// index.js
// 获取应用实例
const app = getApp()

Page({
  data: {
    tobar:[{
      src:'../../images/9.png',
      bt:'毛巾'
    },{
      src:'../../images/5.png',
      bt:'床被'
    },{
      src:'../../images/7.png',
      bt:'洗护'
    },{
      src:'../../images/1.jpg',
      bt:'家具'
    }],
    tobar2:[{
      src:'../../images/c1.jpg',
      bt:'男鞋'
    },{
      src:'../../images/19.png',
      bt:'糕饼'
    },{
      src:'../../images/c2.jpg',
      bt:'幼衣'
    },{
      src:'../../images/c3.jpg',
      bt:'电视'
    }],
    tolist:[{
      src:'../../images/l13.png',
      bt:'天山护肤套装',
      jg:"9.9",
      xl:"10090"
    },{
      src:'../../images/l2.png',
      bt:'伊利小面包'
    },{
      src:'../../images/a1.jpg',
      bt:'立净除毛器'
    },{
      src:'../../images/l4.png',
      bt:'贵人毛巾'
    },{
      src:'../../images/a2.png',
      bt:'大森林洁厕灵'
    },{
      src:'../../images/l15.png',
      bt:'玲珑方巾'
    }],
    tolist2:[{
      src:'../../images/a3.png',
      bt:'心相应抽纸'
    },{
      src:'../../images/l8.png',
      bt:'盼盼小面包'
    },{
      src:'../../images/l9.jpg',
      bt:'一只松鼠坚果三件套'
    },{
      src:'../../images/l10.png',
      bt:'便捷挂'
    },{
      src:'../../images/l11.png',
      bt:'大森林清新剂'
    },{
      src:'../../images/l12.png',
      bt:'一只松鼠小面包'
    }],

  catelist:["男装","女装","零食","家电","床上用品","家具"],
  banner:["../../images/b1.jpg","../../images/b2.jpg","../../images/b3.jpg","../../images/b4.jpg"]

}, 
share:function(){
  wx.showShareMenu({
    withShareTicket: true,
    menus:["shareAppMessage","showTimeLine"]
  })
},
onLoad(){
  this.share();
  this.getShareinfo();
},
onShareAppMessage(){
  return {
    title:"湖南开放大学",
    path:"/pages/car/car",
    imageUrl:"../../images/banner2.jpg"
  }
},
onShareTimeline(){
 return {
  title:"今日抢购送一万元大礼包",
  query:"car?id=4",
  imageUrl:"../../images/banner2.jpg"
 }
},
getShareinfo(){
  wx.getShareInfo({
    shareTicket: 'shareTicket',
    success(res){
      console.log(res);
    }
  })
}
})
